{**
 * The Fifteen game control template
 *
 *
 * @param  int       $width
 * @param  bool      $useAjax
 * @param  array     $order
 * @param  Presenter $presenter
 * @param  Control   $control
 * @param  Template  $template
 *}

{snippet}

<table class="fifteen">
{for $y = $width - 1; $y >= 0; $y--}
<tr>
	{for $x = $width - 1; $x >= 0; $x--}
	<td>
		{if $clickable = $control->isClickable($x, $y, $rel)}<a href="{link Click, $x, $y}" class="ajax" rel="{$rel}">{/if}

		<img src="{$basePath}/images/game{!$order[$x + $y * $width]}.jpg" width="100" height="100" alt="{!$order[$x + $y * $width]+1}" />

		{if $clickable}</a>{/if}
	</td>
	{/for}
</tr>
{/for}
</table>

{/snippet}
